﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="Translate.aspx.vb" Inherits="_Translate" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderNavigator" runat="Server">
    <h2>
        <asp:Label ID="UserAccount" runat="server" /></h2>
    <h1>
        <asp:Label ID="SelectedProject" runat="server" /></h1>
    <asp:GridView ID="FileList" runat="server" AutoGenerateColumns="False" AllowSorting="true" DataKeyNames="name">
        <Columns>
        <asp:ButtonField DataTextField="name" HeaderText="Filename" SortExpression="name" 
            CommandName="EditFile" />
            <asp:BoundField DataField="percentcompleted" HeaderText="Completed %" SortExpression="percentcompleted" />
        </Columns>
    </asp:GridView>
    <h2>
        All your projects</h2>
    <asp:GridView ID="MyProjects" runat="server" AutoGenerateColumns="false" AllowSorting="true" DataKeyNames="InnerText">
        <Columns>
            <asp:Buttonfield DataTextField="InnerText" HeaderText="Projects" SortExpression="InnerText" 
            CommandName="SwitchProject" />
        </Columns>
    </asp:GridView>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderBody" runat="Server">
<h1><asp:Label ID="CurrentFile" runat="server" /></h1>

<asp:Repeater ID="SummaryRepeater" runat="server">
<HeaderTemplate>
<table>
<tr>
<th>Language Code</th>
<th>Completed</th>
<th>Last Update</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#Container.DataItem("LanguageCode")%></td>
<td><%#Container.DataItem("Percentage")%> %</td>
<td><%#DataBinder.Eval(Container.DataItem, "LastUpdate", "{0:d}")%></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table></FooterTemplate>
</asp:Repeater>


<asp:Repeater ID="TextElements" runat="server">
<HeaderTemplate>
<table class="TLTable">
<tr>
<th class="TLElement">Name of Element</th>
<th class="TLEnglish">English Text</th>
<th class="TLTranslated">Translated Text</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr class="<%# IsTranslatedCSS(Container.DataItem("Translation")) %>">
<td class="TLElement"><asp:Label ID="Element" runat="server" Text='<%#Container.DataItem("TextName")%>' /></td>
<td class="TLEnglish"><%#Container.DataItem("English")%></td>
<td class="TLTranslated"><asp:Textbox ID="TranslatedText" runat="server" Text='<%#Container.DataItem("Translation")%>'
         TextMode="MultiLine"  CssClass="TLTranslatedInput" /></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table></FooterTemplate>
</asp:Repeater>
<asp:Button ID="Save" runat="server" Text="Save!" />
</asp:Content>
